package com.example.light.common.result;

/**
 * 全局异常返回
 */
public class CodeMsg {
    private final String msg;
    private final int code;

    CodeMsg(String msg, int code) {
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public int getCode() {
        return code;
    }

    //-------------------------- 个人办公相关信息 -----------------------------
    public interface PersonalCodeMsg {
        //-------------------------- 500100~500299 -----------------------------
        CodeMsg NO_USER = new CodeMsg("没有当前用户", 500100);
        CodeMsg FILE_UPLOAD_FAIL = new CodeMsg("文件上传失败", 500101);
        CodeMsg EMAIL_EXISTS = new CodeMsg("邮箱已被注册", 500102);
        CodeMsg FILE_HEAD_NULL = new CodeMsg("用户头像未选择",500103);
        CodeMsg ADD_SCHEDULE_FAIL = new CodeMsg("添加日程失败", 500104);
        CodeMsg MODIFY_SCHEDULE_FAIL = new CodeMsg("修改日程失败", 500105);
        CodeMsg TIME_ERROR = new CodeMsg("开始时间不能在结束时间之前", 500106);
        CodeMsg NULL_SCHEDULE = new CodeMsg("日程安排不能为空", 500107);
        CodeMsg EMAIL_FAIL = new CodeMsg("当前用户邮箱错误", 500108);
        CodeMsg USER_EMAIL_NON = new CodeMsg("当前用户邮箱不存在", 500109);
        CodeMsg EMAIL_IS_YOUR = new CodeMsg("不能向自己发送留言信息", 500110);
        CodeMsg CHECK_EMAIL_FAIL = new CodeMsg("邮箱检验失败", 500111);
        CodeMsg EMAIL_NON_SET = new CodeMsg("当前用户未设置邮箱", 500112);
        CodeMsg SEND_EMAIL_FAIL = new CodeMsg("发送留言信息失败", 500113);
        CodeMsg ILLAGEL_MESSAGE_PAGE = new CodeMsg("非法留言页面", 500114);
        CodeMsg UPDATE_DRAFT_FAIL = new CodeMsg("更新草稿时报", 500115);
        CodeMsg NULL_PHONE = new CodeMsg("没有用户信息，或不能获取用户电话信息", 500116);
        CodeMsg NAME_CARD_ADD_FAIL = new CodeMsg("用户名片夹添加失败", 500117);
        CodeMsg NAME_CARD_MODIFY_FAIL = new CodeMsg("用户名片夹修改失败", 500118);;
    }

    //-------------------------- 会议管理相关信息 -----------------------------
    public interface MeetingCodeMsg {
        //-------------------------- 500300~500699 -----------------------------
        CodeMsg NO_MEETRECORD = new CodeMsg("沒有查詢到相關會議信息",500300);
        CodeMsg NO_PAGEINFO = new CodeMsg("没有分页信息",500301);
        CodeMsg MEETRECORD_EXCEPTION = new CodeMsg("没有会议信息",500302);
        CodeMsg NO_MEETSUMMARY = new CodeMsg("没有会议信息输入", 500303);
        CodeMsg NULL_ATTACHMENT = new CodeMsg("附件不存在", 500304);
        CodeMsg NULL_SEARCHINFO = new CodeMsg("搜索内容为空",500305);

    }
    //-------------------------- 系统管理相关信息 -----------------------------
    public interface SystemCodeMsg {
        CodeMsg SUCCESS = new CodeMsg("成功", 200);
        CodeMsg ERROR = new CodeMsg("系统失败", 500);
        //---------------- 500700~500999 ----------------
        CodeMsg USER_EXIST = new CodeMsg("当前手机号已被注册", 500700);

        CodeMsg USER_NON = new CodeMsg("当前输入用户为空", 500701);
        CodeMsg USER_NON_REGISTER = new CodeMsg("当前用户未被注册", 500702);
        CodeMsg USER_PASS_NOT_EXACTLY = new CodeMsg("用户密码输入错误", 500703);
        CodeMsg USER_NOT_LOGIN = new CodeMsg("尚未登录", 500704);
        CodeMsg PHONE_EXISTS = new CodeMsg("用户手机号已存在", 500705);
//        CodeMsg MANIPULATE_USER_FAIL = new CodeMsg("尚未登录", 500704);
    }

    //---------------   文件上传异常 501000~5001200  ---------------

    public interface FileCodeMsg{
        CodeMsg NOT_CAN_CREATEFILE = new CodeMsg("创建文件失败",501001);
    }
}
